<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:t="http://myfaces.apache.org/tomahawk"
      xmlns:v="http://corejsf.com/validator">

<f:view>
<f:loadBundle var="text" basename="#{sbForm.bundleName}"/>
    <head>
        <title>#{text['sbDetail.title']}</title>
        <meta name="heading" content="#{text['sbDetail.heading']}"/>
        <style type="text/css">
            .jscalendar-DB-div-style {
                position: absolute;
                margin-top: -120px;
                margin-left: -508px;
            }
    </style>
    </head>
<body id="sbForm">

<h:form id="sbForm" onsubmit="return validateSbForm(this)">
<h:inputHidden value="#{sbForm.sb.id}" id="id"/>
<h:panelGrid columns="3">
    <h:outputLabel styleClass="desc" for="sbmc" value="#{text['sb.sbmc']}"/>
    <t:message for="sbmc" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="sbmc" value="#{sbForm.sb.sbmc}" required="false" maxlength="50">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="cd" value="#{text['sb.cd']}"/>
    <t:message for="cd" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="cd" value="#{sbForm.sb.cd}" required="false" maxlength="20">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="grjz" value="#{text['sb.grjz']}"/>
    <t:message for="grjz" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="grjz" value="#{sbForm.sb.grjz}" required="false" maxlength="255">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="grsj" value="#{text['sb.grsj']}"/>
    <t:message for="grsj" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="grsj" value="#{sbForm.sb.grsj}" required="false" maxlength="23">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="operation" value="#{text['sb.operation']}"/>
    <t:message for="operation" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="operation" value="#{sbForm.sb.operation}" required="false" maxlength="20">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="optdate" value="#{text['sb.optdate']}"/>
    <t:message for="optdate" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="optdate" value="#{sbForm.sb.optdate}" required="false" maxlength="23">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="sbfl" value="#{text['sb.sbfl']}"/>
    <t:message for="sbfl" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="sbfl" value="#{sbForm.sb.sbfl}" required="true" maxlength="50">
        <v:commonsValidator type="required" arg="#{text['sb.sbfl']}"/>
    </h:inputText>
    <h:outputLabel styleClass="desc" for="sjsm" value="#{text['sb.sjsm']}"/>
    <t:message for="sjsm" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="sjsm" value="#{sbForm.sb.sjsm}" required="false" maxlength="255">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="sl" value="#{text['sb.sl']}"/>
    <t:message for="sl" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="sl" value="#{sbForm.sb.sl}" required="false" maxlength="255">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="username" value="#{text['sb.username']}"/>
    <t:message for="username" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="username" value="#{sbForm.sb.username}" required="false" maxlength="50">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="xh" value="#{text['sb.xh']}"/>
    <t:message for="xh" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="xh" value="#{sbForm.sb.xh}" required="false" maxlength="255">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="xntd" value="#{text['sb.xntd']}"/>
    <t:message for="xntd" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="xntd" value="#{sbForm.sb.xntd}" required="false" maxlength="100">
    </h:inputText>

    <h:panelGroup styleClass="buttonBar bottom">
        <h:commandButton value="#{text['button.save']}" action="#{sbForm.save}" id="save" styleClass="button"/>

        <c:if test="${not empty sbForm.sb.id}">
        <h:commandButton value="#{text['button.delete']}" action="#{sbForm.delete}"
            id="delete" styleClass="button" onclick="bCancel=true; return confirmDelete('Sb')"/>
        </c:if>

        <h:commandButton value="#{text['button.cancel']}" action="cancel" immediate="true"
            id="cancel" styleClass="button" onclick="bCancel=true"/>
    </h:panelGroup>
    <h:outputText/><h:outputText/>
</h:panelGrid>
</h:form>

<v:validatorScript functionName="validateSbForm"/>

<script type="text/javascript">
    //Form.focusFirstElement($('sbForm'));
    highlightFormElements();
</script>

</body>
</f:view>
</html>
